package com.andy.utils;

public class StringUtils extends org.springframework.util.StringUtils {
	
	public static boolean checkStringArrayEquals(String[] arrA, String[] arrB) {
		boolean equal = false;
		if (arrA != null && arrB != null && (arrB.length == arrA.length) && arrA.length > 0) {
			int arrLengthA = arrA.length;
			for (int i = 0; i < arrLengthA; i ++) {
				if (!isContains(arrB, arrA[i])) {
					return false;
				}
			}
			equal = true;
		}
		return equal;
	}
	
	public static boolean isContains(String[] arr, String string) {
		boolean exists = false;
		if (string != null && arr != null && arr.length > 0) {
			int arrLength = arr.length;
			for (int j = 0; j < arrLength; j ++) {
				if (string.equals(arr[j])) {
					exists = true;
					break;
				}
			}
		}
		return exists;
	}

}
